Skip to content

Don't panic on missing binds in insert_split#1181

Merged
sgrif merged 3 commits into
mainfrom
sg-no-panic
Jul 13, 2026
Merged

Don't panic on missing binds in insert_split#1181
sgrif merged 3 commits into
mainfrom
sg-no-panic

Conversation

@sgrif

@sgrif sgrif commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

The code on the old parser, surprisingly, treated this operation as infallible, and just sent an incorrect number of parameters to the shards (which given that we don't behave transactionally for split inserts, could lead to a partial insert). This doesn't fix the lack of transactional behavior, but at least in the new port we won't send any rows at all if we don't have enough bind parameters

The code on the old parser, surprisingly, treated this operation as
infallible, and just sent an incorrect number of parameters to the
shards (which given that we don't behave transactionally for split
inserts, could lead to a partial insert). This doesn't fix the lack of
transactional behavior, but at least in the new port we won't send any
rows at all if we don't have enough bind parameters
@sgrif sgrif requested a review from meskill July 13, 2026 12:48
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread pgdog/src/frontend/router/parser/rewrite/statement/insert.rs
@sgrif sgrif merged commit 1f39ef2 into main Jul 13, 2026
24 checks passed
@sgrif sgrif deleted the sg-no-panic branch July 13, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants